const getters = {
    // user
    userInfo: state => state.user.userInfo,
    userId: state => state.user.userInfo._id,
    hasUserInfo: state => {
        return !!state.user.userInfo.avatar && !!state.user.userInfo.nickname;
    },
    isIOSDevice: state => state.user.deviceInfo.platform === 'ios'
};

export default getters;
